﻿using FH.Application.PorductApp.Dtos;
using FH.Application.UserApp.Dtos;
using FH.Core.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FH.Application.UserApp
{
    public interface IProductAppService
    {
        List<ProductDto> GetProducts(Guid? categoryId, int startPage, int pageSize, out int rowCount);

        ProductDto InsertOrUpdate(ProductDto dto);

        /// <summary>
        /// 根据Id集合批量删除
        /// </summary>
        /// <param name="ids">Id集合</param>
        void DeleteBatch(List<Guid> ids);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">Id</param>
        void Delete(Guid id);

        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        ProductDto Get(Guid id);

        List<CategoryDto> GetCategoryDtos(int startPage, int pageSize, out int rowCount);

        CategoryDto InsertOrUpdateCategory(CategoryDto dto);

        /// <summary>
        /// 根据Id集合批量删除
        /// </summary>
        /// <param name="ids">Id集合</param>
        void DeleteBatchCategory(List<Guid> ids);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">Id</param>
        void DeleteCategory(Guid id);

        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        CategoryDto GetCategory(Guid id);
        /// <summary>
        /// 根据Id获取实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        IEnumerable<CategoryDto> GetCategory(Guid[] ids);
    }
}
